home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
- Filter by Bill Todd
-
- Copyright 1986
-
- This program is placed in the public domain.
-
- ------------------------------------------------------------
-
- DISCLAIMER OF WARRANTY
-
- THIS SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" AND
- WITHOUT WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY. ANY
- STATEMENTS MADE BY ANY PERSON ABOUT THIS SOFTWARE DO NOT
- CONSTITUTE WARRANTIES AND SHALL NOT BE RELIED ON BY THE USER
- IN DECIDING WHETHER TO USE THESE PROGRAMS.
-
- THIS PROGRAM IS PROVIDED WITHOUT ANY EXPRESS OR IMPLIED
- WARRANTIES WHATSOEVER. BECAUSE OF THE DIVERSITY OF
- CONDITIONS AND HARDWARE UNDER WHICH THESE PROGRAMS MAY BE
- USED, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS
- OFFERED. THE USER IS ADVISED TO TEST THESE PROGRAMS
- THOROUGHLY BEFORE RELYING ON THEM. THE USER MUST ASSUME THE
- ENTIRE RISK OF USING THESE PROGRAMS. ANY LIABILITY OF
- PROVIDER OR MANUFACTURER WILL BE LIMITED EXCLUSIVELY TO
- PRODUCT REPLACEMENT.
-
- -------------------------------------------------------------
-
- This program reformats files. Fields may be deleted or
- reordered. Characters may be inserted at any location within
- a record, at the beginning of each record, or at the end of
- each record. If the input records end with a carriage return
- line feed sequence it can be removed. If not, a carriage
- return line feed may be added. Changes to the records are
- controlled by parameters in a map file. The map file may
- contain the following directives.
-
- Size : The input record size including the carriage
- return and line feed at the end of the record
- (if present). NOTE: This directive is
- required.
-
- Noreturn: Do not place a carriage return & line feed at
- the end of output file records.
-
- First: The string of characters placed at the
- beginning of each record.
-
- Last: The string of characters placed at the end of
- each record.
-
- Delimiter: The string of characters placed after each
- field except the last.
-
-
-
-
-
-
- Input: The input file path and name. If you do not
- enter an input file name at run time this file
- will be used.
-
- Output: The output file path and name. If you do not
- enter an output file name at run time this
- file will be used.
-
- These directives may appear in any order. They must be
- followd by the field specifications. Each field is defined
- by a one line entry in the map file. The entry consists of
- the starting position of the field in the input record
- followed by the ending position, and optiontionally, followed
- by a string of characters to be inserted after the field in
- the output record. If no character string is specified the
- string following the Delimiter keyword will be used. The
- fields will be placed in the output record in the order that
- they are listed in the map file. The following is a sample
- map file.
-
- Optionally, the field specifications may begin with the field
- name. The name is not used by the program but may be included
- for reference. The field name MUST begin with a semicolon
- and may not contain any blanks.
-
- Size 125
- First "
- Last "<05>
- Delimiter ","
- Input in_file
- Output out_file
- Noreturn
- ;name 1 20
- ;acct-number 30 35
- ;month 24 25 /
- ;day 26 27 /
- ;year 22 23
-
- All items on the same line must be separated by one or more
- spaces. To include spaces in the delimiter strings use the
- tilde (~).
-
- You may also include any character in a string by placing its
- decimal value in brackets, for example, <05> would place a
- Ctrl-E in the string. The only way to place the < character
- in a string is by using its decimal value, <60>.
-
- The sample above reads a file consisting of records which are
- 125 bytes long. The output record will consist of bytes
- 1-20, 30-35, 24-25, 26-27 and 22-23 in that order. Each
- output record will start double quotation mark (") and end
- with a double quotation mark followed by a Ctrl-E (<05>).
-
- Each field will be followed by the three characters ","
-
-
-
-
-
- except 24-25 and 26-27 which will be followed by /. The
- output records will not be terminated with a carriage return
- and line feed.
-
- For batch operation the file names may be specified on the
- command line. For example:
-
- FILTER MAP_FILE_NAME IN_FILE_NAME OUT_FILE_NAME
-
- The file names must be given in the order shown. If the
- input and output file names are given in the map file they do
- not have to be specified on the command line.
-
- To stop the program while the file is being processed press
- any key and hold it for about two seconds.
-
- Program limits are:
-
- Input record size: 8192 bytes.
- Output record size: 8192 bytes.
- Number of fields: 512.
- Length of delimiter strings: 64 characters.
-
-
-